Chebyshev fit
Chebyshev evaluation: All arguments are input. c(1:m) is an array of Chebyshev coefficients, the first m elements of c output from chebft (which must have been called with the same a and b). The Chebyshev polynomial evaluated and the result is returned as the function value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp) | :: | a | ||||
real(kind=wp) | :: | b | ||||
real(kind=wp) | :: | c(m) | ||||
integer | :: | m | ||||
real(kind=wp) | :: | x |
Chebyshev fit: Given a function func, lower and upper limits of the interval [a,b], and a maximum degree n, this routine computes the n coefficients c(k) such that func(x) approximately = SUMM_(k=1)^(k=n)[c(k)*T(k-1)(y)]-c(1)/2, where y and x are related by (5.8.10). This routine is to be used with moderately large n (e.g., 30 or 50), the array of cs subsequently to be truncated at the smaller value m such that c(m+1) and subsequent elements are negligible. Parameters: Maximum expected value of n, and ð.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp) | :: | a | ||||
real(kind=wp) | :: | b | ||||
real(kind=wp) | :: | c(n) | ||||
integer | :: | n | ||||
real | :: | func |
Given a,b,c(1:n), as output from routine chebft(), and given n, the desired degree of approximation (length of c to be used), this routine returns the array cder(1:n), the Chebyshev coefficients of the derivative of the function whose coefficients are c(1:n).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp) | :: | a | ||||
real(kind=wp) | :: | b | ||||
real(kind=wp) | :: | c(n) | ||||
real(kind=wp) | :: | cder(n) | ||||
integer | :: | n |